@@ -6,7 +6,7 @@ from django_response import response  | 
            ||
| 6 | 6 | 
                 | 
            
| 7 | 7 | 
                from apps.contract.models import LensmanContributionContractInfo  | 
            
| 8 | 8 | 
                from kodo.decorators import check_admin  | 
            
| 9 | 
                -from utils.error.errno_utils import TencentCloudStatusCode  | 
            |
| 9 | 
                +from utils.error.errno_utils import ContractStatusCode, TencentCloudStatusCode  | 
            |
| 10 | 10 | 
                from utils.tencentcloud.ess import describe_file_urls  | 
            
| 11 | 11 | 
                 | 
            
| 12 | 12 | 
                 | 
            
                @@ -17,6 +17,8 @@ def get_signed_contribtion_contract_file_api(request, administrator):  | 
            ||
| 17 | 17 | 
                     user_id = request.POST.get('user_id', '')
               | 
            
| 18 | 18 | 
                 | 
            
| 19 | 19 | 
                contract = LensmanContributionContractInfo.objects.filter(contribution_id=contribution_id, user_id=user_id).first()  | 
            
| 20 | 
                + if not contract:  | 
            |
| 21 | 
                + return response(ContractStatusCode.CONTRACT_NOT_FOUND)  | 
            |
| 20 | 22 | 
                 | 
            
| 21 | 23 | 
                describe_file_urls_result = describe_file_urls(business_id=contract.flow_id)  | 
            
| 22 | 24 | 
                if not describe_file_urls_result:  | 
            
                @@ -45,7 +45,11 @@ def get_contribtion_contract_api(request):  | 
            ||
| 45 | 45 | 
                lensman = LensmanInfo.objects.get(lensman_id=lensman_id)  | 
            
| 46 | 46 | 
                 | 
            
| 47 | 47 | 
                contract, _ = LensmanContributionContractInfo.objects.update_or_create(  | 
            
| 48 | 
                - user_id=user_id, lensman_id=lensman_id, activity_id=activity_id, contribution_id=contribution_id)  | 
            |
| 48 | 
                + user_id=user_id,  | 
            |
| 49 | 
                + lensman_id=lensman_id,  | 
            |
| 50 | 
                + activity_id=activity_id,  | 
            |
| 51 | 
                + contribution_id=contribution_id,  | 
            |
| 52 | 
                + )  | 
            |
| 49 | 53 | 
                 | 
            
| 50 | 54 | 
                file_ids = upload_contribution_images(contribution_id)  | 
            
| 51 | 55 | 
                 | 
            
                @@ -9,7 +9,6 @@ from .conf import NUMBER_LOW_AN2CN, NUMBER_UP_AN2CN, UNIT_LOW_ORDER_AN2CN, UNIT_  | 
            ||
| 9 | 9 | 
                # from proces import preprocess  | 
            
| 10 | 10 | 
                 | 
            
| 11 | 11 | 
                 | 
            
| 12 | 
                -  | 
            |
| 13 | 12 | 
                class An2Cn(object):  | 
            
| 14 | 13 | 
                def __init__(self):  | 
            
| 15 | 14 | 
                self.all_num = "0123456789"  | 
            
                @@ -1,11 +1,11 @@  | 
            ||
| 1 | 1 | 
                import re  | 
            
| 2 | 
                -from warnings import warn  | 
            |
| 3 | 2 | 
                from typing import Union  | 
            
| 3 | 
                +from warnings import warn  | 
            |
| 4 | 4 | 
                 | 
            
| 5 | 5 | 
                from proces import preprocess  | 
            
| 6 | 6 | 
                 | 
            
| 7 | 7 | 
                from .an2cn import An2Cn  | 
            
| 8 | 
                -from .conf import NUMBER_CN2AN, UNIT_CN2AN, STRICT_CN_NUMBER, NORMAL_CN_NUMBER, NUMBER_LOW_AN2CN, UNIT_LOW_AN2CN  | 
            |
| 8 | 
                +from .conf import NORMAL_CN_NUMBER, NUMBER_CN2AN, NUMBER_LOW_AN2CN, STRICT_CN_NUMBER, UNIT_CN2AN, UNIT_LOW_AN2CN  | 
            |
| 9 | 9 | 
                 | 
            
| 10 | 10 | 
                 | 
            
| 11 | 11 | 
                class Cn2An(object):  | 
            
                @@ -3,6 +3,7 @@ import torbjorn as tbn  | 
            ||
| 3 | 3 | 
                from .an2cn import An2Cn  | 
            
| 4 | 4 | 
                from .cn2an import Cn2An  | 
            
| 5 | 5 | 
                 | 
            
| 6 | 
                +  | 
            |
| 6 | 7 | 
                ac = An2Cn()  | 
            
| 7 | 8 | 
                ca = Cn2An()  | 
            
| 8 | 9 | 
                 | 
            
                @@ -1,8 +1,8 @@  | 
            ||
| 1 | 1 | 
                import re  | 
            
| 2 | 2 | 
                from warnings import warn  | 
            
| 3 | 3 | 
                 | 
            
| 4 | 
                -from .cn2an import Cn2An  | 
            |
| 5 | 4 | 
                from .an2cn import An2Cn  | 
            
| 5 | 
                +from .cn2an import Cn2An  | 
            |
| 6 | 6 | 
                from .conf import UNIT_CN2AN  | 
            
| 7 | 7 | 
                 | 
            
| 8 | 8 | 
                 |